package com.demoview.test.myapplication.adapter;

import android.text.TextUtils;

import com.demoview.test.myapplication.R;
import com.demoview.test.myapplication.User;


import java.util.List;

/**
 * Created by Sky.L on 2021-09-07
 */
public class MsgsAdapter extends RBaseAdapter<User>{

    public MsgsAdapter(int layoutid, List<User> list) {
        super(layoutid, list);
    }

    @Override
    public void getConver(RBaseViewholder holder, User data) {

        if (!TextUtils.isEmpty(data.name) && !TextUtils.isEmpty(data.msg)){
            holder.setText(R.id.item_user,data.name);
            holder.setText(R.id.item_msg,data.msg);
        }
        if (!TextUtils.isEmpty(data.msg)){
            holder.setText(R.id.item_msg,data.msg);
        }
    }
}
